package com.caiyigo.baihua.serviceImpl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.caiyigo.baihua.dao.KaoshizwMapper;
import com.caiyigo.baihua.dao.KaoshizwMapperSql;
import com.caiyigo.baihua.dto.CjBean;
import com.caiyigo.baihua.dto.KaoshizwDto;
import com.caiyigo.baihua.model.Kaoshizw;
import com.caiyigo.baihua.service.KaoshizwService;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;

@Transactional
@Service
public class KaoshizwServiceImpl implements KaoshizwService {
	@Resource(name = "kaoshizwMapper")
	KaoshizwMapper kaoshizwMapper;
	@Resource(name = "kaoshizwMapperSql")
	KaoshizwMapperSql kaoshizwMapperSql;

	@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
	@Override
	public int deleteByPrimaryKey(Integer ksId) {
		// TODO Auto-generated method stub
		return kaoshizwMapper.deleteByPrimaryKey(ksId);
	}

	@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
	@Override
	public int insert(Kaoshizw record) {
		// TODO Auto-generated method stub
		return kaoshizwMapper.insert(record);
	}

	@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
	@Override
	public int insertSelective(Kaoshizw record) {
		// TODO Auto-generated method stub
		return kaoshizwMapper.insertSelective(record);
	}

	@Override
	public Kaoshizw selectByPrimaryKey(Integer ksId) {
		// TODO Auto-generated method stub
		return kaoshizwMapper.selectByPrimaryKey(ksId);
	}

	@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
	@Override
	public int updateByPrimaryKeySelective(Kaoshizw record) {
		// TODO Auto-generated method stub
		return kaoshizwMapper.updateByPrimaryKeySelective(record);
	}

	@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
	@Override
	public int updateByPrimaryKey(Kaoshizw record) {
		// TODO Auto-generated method stub
		return kaoshizwMapper.updateByPrimaryKey(record);
	}

	@Override
	public List getList(KaoshizwDto dto, PageBounds pageBounds) {
		// TODO Auto-generated method stub
		return kaoshizwMapperSql.getList(dto, pageBounds);
	}

	@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
	@Override
	public int batchDelete(String[] ids) {
		// TODO Auto-generated method stub
		return kaoshizwMapper.batchDelete(ids);
	}

	@Override
	public List<KaoshizwDto> getAll() {
		// TODO Auto-generated method stub
		return kaoshizwMapper.getAll();
	}

	@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
	@Override
	public int batchUpdate(List<KaoshizwDto> record) {
		// TODO Auto-generated method stub
		return kaoshizwMapper.batchUpdate(record);
	}

	@Override
	public List<CjBean> smsZwList(String pici) {
		// TODO Auto-generated method stub
		return kaoshizwMapper.smsZwList(pici);
	}

	@Override
	public int updateSmsZwList(Kaoshizw record) {
		// TODO Auto-generated method stub
		return kaoshizwMapper.updateSmsZwList(record);
	}

}
